package com.surveillance.util;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.sun.xml.internal.ws.wsdl.writer.document.Service;
import com.surveillance.BO.AffectedSurveillantsBo;
import com.surveillance.BO.AgendaBO;
import com.surveillance.BO.BOLayer;
import com.surveillance.entities.AffectationEtudiantsDetail;
import com.surveillance.entities.AffectedSurveillants;
import com.surveillance.entities.Agenda;
import com.surveillance.entities.Etudiant;
import com.surveillance.entities.Examen;
import com.surveillance.entities.Matiere;
import com.surveillance.entities.NiveauSalles;
import com.surveillance.entities.Salle;
import com.surveillance.entities.Servicee;
import com.surveillance.entities.Surveillant;
import com.surveillance.entities.User;

public class LoadBeans {
	private static ApplicationContext appContext = new ClassPathXmlApplicationContext(
			"beanLocations.xml");
	private static BOLayer<Salle> salleBO = (BOLayer<Salle>) appContext
			.getBean("SalleBO");
	private static BOLayer<User> userBO = (BOLayer<User>) appContext
			.getBean("UserBO");
	private static BOLayer<Etudiant> etudiantBO = (BOLayer<Etudiant>) appContext
			.getBean("EtudiantBO");
	private static BOLayer<Examen> examenBO = (BOLayer<Examen>) appContext
			.getBean("ExamenBO");
	private static BOLayer<Surveillant> surveillantBO = (BOLayer<Surveillant>) appContext
			.getBean("SurveillantBO");
	private static BOLayer<Servicee> serviceBO = (BOLayer<Servicee>) appContext
			.getBean("ServiceBO");
	private static BOLayer<Matiere> matiereBO = (BOLayer<Matiere>) appContext
			.getBean("MatiereBO");
	private static BOLayer<Agenda> agendaBo = (BOLayer<Agenda>) appContext
			.getBean("AgendaBO");
	private static BOLayer<NiveauSalles> niveauSallesBo = (BOLayer<NiveauSalles>) appContext
			.getBean("NiveauSallesBo");
	private static BOLayer<AffectationEtudiantsDetail> affectationEtudiantsDetail = (BOLayer<AffectationEtudiantsDetail>) appContext
			.getBean("AffectationEtudiantsDetailBo");
	private static BOLayer<AffectedSurveillants> affectedSurveillantsBo = (BOLayer<AffectedSurveillants>) appContext
			.getBean("AffectedSurveillantsBo");

	public static BOLayer<Salle> getSalleBO() {
		return salleBO;
	}
	public static BOLayer<User> getUserBO() {
		return userBO;
	}
	public static BOLayer<Etudiant> getEtudiantBO() {
		return etudiantBO;
	}
	public static BOLayer<Examen> getExamenBO() {
		return examenBO;
	}
	/**
	 * @return the surveillantBO
	 */
	public static BOLayer<Surveillant> getSurveillantBO() {
		return surveillantBO;
	}
	/**
	 * @return the serviceBO
	 */
	public static BOLayer<Servicee> getServiceBO() {
		return serviceBO;
	}
	/**
	 * @return the matiereBO
	 */
	public static BOLayer<Matiere> getMatiereBO() {
		return matiereBO;
	}
	/**
	 * @param matiereBO the matiereBO to set
	 */
	public static BOLayer<Agenda> getAgendaBo() {
		// TODO Auto-generated method stub
		return agendaBo;
	}
	public static BOLayer<NiveauSalles> getNiveauSallesBo() {
		return niveauSallesBo;
	}
	public static void setNiveauSallesBo(BOLayer<NiveauSalles> niveauSallesBo) {
		LoadBeans.niveauSallesBo = niveauSallesBo;
	}
	public static BOLayer<AffectationEtudiantsDetail> getAffectationEtudiantsDetail() {
		return affectationEtudiantsDetail;
	}
	public static void setAffectationEtudiantsDetail(
			BOLayer<AffectationEtudiantsDetail> affectationEtudiantsDetail) {
		LoadBeans.affectationEtudiantsDetail = affectationEtudiantsDetail;
	}
	public static BOLayer<AffectedSurveillants> getAffectedSurveillantsBo() {
		// TODO Auto-generated method stub
		return affectedSurveillantsBo;
	}

}
